package my.http;

import android.text.TextUtils;

import com.alibaba.fastjson.annotation.JSONField;
import com.app.car.bean.MenuBean;

import java.util.List;

public class MyBaseBean {

	/** 数据 */
	private String resultData;
	
//	/** 数据 */
//	@JsonName("result")
//	private String otherResultData;

	/** 借口反馈信息 */
	private String statusInfo;
	/** 状态 200正常 */
	private int statusCode = -1;
	
	private int errCode = -1;

	private int recordsTotal;

	private String code;

	public static final int CODE_OK = 200;


	private String attr;

	private String token;
	private String msg;




	@JSONField(name="data")
	public String getResultData() {
		return resultData;
	}

	@JSONField(name="data")  
	public void setResultData(String resultData) {
		this.resultData = resultData;
	}

	@JSONField(name="message")
	public String getStatusInfo() {
		if(TextUtils.isEmpty(statusInfo) && !TextUtils.isEmpty(msg)){
			return msg;
		}
		return statusInfo;
	}

	@JSONField(name="message")
	public void setStatusInfo(String statusInfo) {
		this.statusInfo = statusInfo;
	}

	public int getStatusCode() {
		if(errCode == CODE_OK)return errCode;
		return statusCode;
	}

	public void setStatusCode(int statusCode) {
		this.statusCode = statusCode;
	}
	
	public  boolean isCodeOk(){
		return statusCode == CODE_OK;
	}

	public int getErrCode() {
		return errCode;
	}

	public void setErrCode(int errCode) {
		this.errCode = errCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public int getRecordsTotal() {
		return recordsTotal;
	}

	public void setRecordsTotal(int recordsTotal) {
		this.recordsTotal = recordsTotal;
	}

	public String getAttr() {
		return attr;
	}

	public void setAttr(String attr) {
		this.attr = attr;
	}


	private int totalPages;
	private int total;
	private int pageSize;
	private int current;

	public int getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(int totalPages) {
		this.totalPages = totalPages;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getCurrent() {
		return current;
	}

	public void setCurrent(int current) {
		this.current = current;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}


	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}



	String uid;
	String uno;
	String uname;
	String ufsign;
	String aid;
	String aname;



	String bname;
	String acode;

	String ufs;
	private List<MenuBean>right;

	public List<MenuBean> getRight() {
		return right;
	}

	public void setRight(List<MenuBean> right) {
		this.right = right;
	}


	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getUno() {
		return uno;
	}

	public void setUno(String uno) {
		this.uno = uno;
	}

	public String getUname() {
		return uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public String getUfsign() {
		return ufsign;
	}

	public void setUfsign(String ufsign) {
		this.ufsign = ufsign;
	}

	public String getAid() {
		return aid;
	}

	public void setAid(String aid) {
		this.aid = aid;
	}

	public String getAname() {
		return aname;
	}

	public void setAname(String aname) {
		this.aname = aname;
	}

	public String getAcode() {
		return acode;
	}

	public void setAcode(String acode) {
		this.acode = acode;
	}

	public String getUfs() {
		return ufs;
	}

	public void setUfs(String ufs) {
		this.ufs = ufs;
	}

	public String getBname() {
		return bname;
	}

	public void setBname(String bname) {
		this.bname = bname;
	}
}
